/*******************************************************************************
 * Copyright (c) 2010, 2030 www.itlaobing.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package cn.itlaobing.dao;/**
 * Created by asus-pc on 2017/11/30 0030.
 */


import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * ClassName: UserDaoImpl <br/>
 * Function: TODO 功能描述 <br/>
 * date: 2017/11/30 0030 16:05 <br/>
 *
 * @author 卖姑娘的小柴火
 * @since JDK 1.8
 */
@Repository
public class UserDaoImpl implements UserDao {
    private Logger logger=Logger.getLogger(this.getClass());

//    public void save(String name) {
//        logger.info("Dao中保存》》"+name);
//
//    }
    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public void save(String name) {
        String sql="insert into demo(userid,username) values (seq_userid.nextval,?)";
        jdbcTemplate.update(sql,name);
    }
}
